package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Mobile   string `gorm:"type:char(11)"`
	Password string `gorm:"type:char(32)"`
}

type Product struct {
	gorm.Model
	Title  string  `gorm:"type:varchar(30);commit:商品名称"`
	UserId int64   `gorm:"type:int(11);commit:用户id"`
	Price  float64 `gorm:"type:decimal(10,2);commit:商品价格"`
	Stock  int64   `gorm:"type:int(11);commit:商品库存"`
	Image  string  `gorm:"type:varchar(500);commit:商品图片"`
}
